]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
AppIcon: Nullify _draggable if available on destruction
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 9 Aug 2019 21:30:44 +0000 (23:30 +0200)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Fri, 9 Aug 2019 21:30:52 +0000 (23:30 +0200)
When an AppIcon actor is destroyed we try to unset a non-existent draggable
property.

Fix the typo, doing this even if we're not currently in a drag operation.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/677

js/ui/appDisplay.js

index 50b8fd9b9dcafbdc27df2e7b349a24afa6e37305..ac6d8ce2546474cfd1cd6d9df74c87eda632bde1 100644 (file)
@@ -1897,9 +1897,10 @@ var AppIcon = class AppIcon {
         }
         if (this._stateChangedId > 0)
             this.app.disconnect(this._stateChangedId);
-        if (this._draggable && this._dragging) {
-            Main.overview.endItemDrag(this);
-            this.draggable = null;
+        if (this._draggable) {
+            if (this._dragging)
+                Main.overview.endItemDrag(this);
+            this._draggable = null;
         }
         this._stateChangedId = 0;
         this._removeMenuTimeout();